import java.util.*;

class Foo<O> { 
  Foo f3;
  Foo<Integer> f1;
  Foo<String> f2;
  Foo<O> next1;
  Foo<?> next2;
  void bla(Foo<?> f1, Foo<?> f2) {
    next1 = f3;
    f3 = next1;
    //f1.next = f2;
    //f1.next1 = f1; // incompatible types
		//found   : Foo<capture#559 of ?>
		//required: Foo<capture#48 of ?>
    f1.next2 = f2;
    f1 = f2;
    f2 = f1.f1;
    int i=4, j=3+i*2;
  }
}

class Bar {
  public static <O1,O2>  void foo(ArrayList<O1> a) {
		System.out.println(a);
	}


  public static ArrayList<?> sArr = new ArrayList<Integer>();
  public static <O>  void main(String[] args) {
	  int i,j;
	  foo(null);

	Object o = null;
	ArrayList<?> l2,l;
	l2 = (ArrayList<?>) o;
	l = new ArrayList<Integer>(4); //(ArrayList<?>)o;
	foo(l);

    Map<String,String> map = new LinkedHashMap<String,String>(100, 1, true);
    map.put("a","a");
    map.put("b","b"); 
    map.put("c","c"); 
    for (String key : map.keySet()) {
      System.out.println("value="+map.get(key)); // throws java.util.ConcurrentModificationException (after printing 1 element)
    }
  }
}
